import React from 'react'
import {useNavigate} from "react-router-dom"
function Ason() {
  let  navgiate = useNavigate()
  let fn = ()=> {
    navgiate("/detail",{
        state:{
            name:"zhangsan"
        }
    })
  }
  return (
    <div>
        <button onClick={fn}>跳转</button>
    </div>
  )
}

export default Ason